<?php 
include("includes/code.php");

$title = $lang['all'];

///// headerni olamiz
include("includes/header.php"); 
?>

<!-- content and sidebar -->
<div id="main">
<table class="main_table" cellspacing="0" cellpadding="0">
  <tr valign="top">
    <td class="left_col">
<!-- ------------- left start ------------- -->
<?php include("includes/left.php"); ?>
    
<!-- ----------------- left finish ---------------- -->
    </td>
    <td>
<div class="content">
<!-- content start -->

<h4 class="sarlavha"><?=$lang['all']; ?></h4>
<!--tovarlar -->
<?php 
$result = mysql_query("SELECT id,cat,title,price FROM data ORDER by id desc",$db);
if (!$result)
{
	echo "<p>Bazadan malumotlar olinmadi, bu haqida adminga ayting uzsayt@gmail.com</p>";
	exit(mysql_error());
}
if(mysql_num_rows($result) > 0)
{
while(list($id, $cat, $title, $price) = mysql_fetch_array($result)) {
	echo "<div class='tovar_all'> 
			<span class='text'><a href='view_tovar.php?id=$id'> $title </a> </span> 
			<span class='price'>".PRICE." $price  </span>
			
			<a href='view_tovar.php?id=$id#form'><img src='themes/default/img/buy.png'  align='absmiddle' title='Buy Now' /></a>
			<a href='cart.php?action=add&id=$id'> <img src='themes/default/img/add.png' align='absmiddle' title='Buy Now' /></a>
		</div>";
	}
}
else
{
echo NO_GOODS;
}
?> 
<!--tovarlar // -->

<!-- content finish -->
</div>
    </td>
    <td class="right_col">
<!-- -------- right start ----------- -->
<?php include("includes/right.php"); ?>
<!-- --------- right finish ------- -->
    </td>
  </tr>
</table>

</div>
<!-- content and sidebar finish -->

</div>
<!-- main container finish -->
<?php include("includes/footer.php"); ?>